This document contains figures and statistics used for Time-Frequency Representation (TFR) analyses.

source('ana/shared.R')
source('ana/permutationTtest.R')

Error Feedback Processing

We transform the signals across epochs into time-frequency representations (TFRs) using Morlet wavelet (6 cycles) convolution. The frequencies we include are log-spaced values that range from 6 to 35 Hz. First, we show plots time-locked to feedback onset. We include 250 ms before the feedback onset, to show TFRs around the movement onset. However, we focus our statistical analyses for the second that follows feedback onset.

Early vs. Late conditions

We define early and late conditions in a similar manner to how we defined these conditions in our ERP analyses. That is, we consider the first two blocks of rotation and mirror training (first 12 trials) as early training and the last six blocks (36 trials) as late training. For the random rotation, we combined both random rotation sets as they do not show differences in performance. From this combined set of trials, the first two blocks (12 trials) are considered as early training, while the last 4 blocks (24 trials) are considered as late training.

We then generate TFRs for each of the conditions (early vs. late for fixed rotation, mirror reversal, random rotation), and calculate TFRs for the baseline aligned reaches (48 trials). We focused on two different regions of interest (ROIs): the medial frontal areas (F1, Fz, F2, FC1, FCz, FC2, C1, Cz, C2) and lateral central areas of the left hemisphere (i.e., opposite the moving hand; C5, C3, CP5, CP3, CP1, P5, P3, P1).

Time-Frequency Representations

Medial frontal areas

Lateral central areas

Frequency bands compared to aligned baseline

For each ROI, we calculate the mean power (µV²) within each participant of the following frequency bands: theta (6-8 Hz), alpha (9-13 Hz), and beta (13-25 Hz). We then compare these mean frequencies between early and late training for the different perturbation types.

First, we compare each early or late condition to the aligned baseline condition. For statistical analyses, we implemented a cluster-based permutation t-test. Clusters of time points that exceed the t-value threshold (determined by a t-distribution, given a p-value of 0.05 and sample size of 32) will be shown in light orange or red colors, while clusters of time points that significantly differ from chance after 1000 permutations will be shown in dark orange or red colors.

Theta band
plotPermTestEarlyLateTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestEarlyLateTFRs(freqs = 'theta', roi = 'latcen')

Alpha band
plotPermTestEarlyLateTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestEarlyLateTFRs(freqs = 'alpha', roi = 'latcen')

Beta band
plotPermTestEarlyLateTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestEarlyLateTFRs(freqs = 'beta', roi = 'latcen')

Time-Frequency Representations (Early vs. Late Difference Waves)

We then calculate the TFR differences between each early or late condition and the aligned condition. Then we compare early from late in each of the perturbation types.

Medial frontal areas

Lateral central areas

Frequency bands comparing differences between early and late training

Theta band
plotPermTestEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

For the medial frontal areas, we observe differences between early and late in the random perturbation. This difference occurs around 300 ms up to 1 second following feedback onset.

For the lateral central areas, we observe a difference in the random and mirror perturbations, where we observe early training to be more negative than the late condition.

Alpha band
plotPermTestEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

For the medial frontal areas, we do not find any significant clusters.

For the lateral central areas, we observe a difference between early and late training in the rotation perturbation, where late training is more positive around 500 ms to 750 ms post-feedback onset.

Beta band
plotPermTestEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

For the medial frontal areas, we find differences between early and late training for the random perturbation, with early training having more negative beta power around 250 to 500 ms post-feedback.

For the lateral central areas, we observe differences in the mirror perturbation, where early training is more negative than late, around 500 ms to 900 ms post-feedback.

Time-Frequency Representations (Perturbation type comparisons)

Next, we subtract the early from the late condition, across the different perturbation types. Then, we compare each perturbation type with the other two. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves.

Medial frontal areas

Latercal central areas

Frequency bands comparing across perturbation types

Theta band
plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

We do not observe any significant clusters for both regions of interest.

Alpha band
plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

We do not observe any significant clusters for both regions of interest.

Beta band
plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We observe a significant cluster when comparing fixed and random rotation perturbations, around 250 ms post-feedback, with random rotation showing more positive activity.

Small vs. Large errors

We repeat the same analyses steps, but now compare small and large errors experienced after the reaching movement. We defined these small and large error conditions similar to how we defined them in our ERP analyses.

Time-Frequency Representations

Medial frontal areas

Lateral central areas

Frequency bands compared to aligned baseline

For each ROI, we calculate the mean power (µV²) within each participant of the following frequency bands: theta (6-8 Hz), alpha (9-13 Hz), and beta (13-25 Hz). We then compare these mean frequencies between small and large error conditions for the different perturbation types.

First, we compare each small or large condition to the aligned baseline condition. For statistical analyses, we implemented a cluster-based permutation t-test. Clusters of time points that exceed the t-value threshold (determined by a t-distribution, given a p-value of 0.05 and sample size of 32) will be shown in light orange or red colors, while clusters of time points that significantly differ from chance after 1000 permutations will be shown in dark orange or red colors.

Theta band
plotPermTestSmallLargeTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestSmallLargeTFRs(freqs = 'theta', roi = 'latcen')

Alpha band
plotPermTestSmallLargeTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestSmallLargeTFRs(freqs = 'alpha', roi = 'latcen')

Beta band
plotPermTestSmallLargeTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestSmallLargeTFRs(freqs = 'beta', roi = 'latcen')

Time-Frequency Representations (Small vs. Large Difference Waves)

Next, we subtract the aligned condition from each small and large condition, across the different perturbation types. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves

Medial frontal areas

Latercal central areas

Frequency bands comparing difference waves between small and large errors

Theta band
plotPermTestSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

For both regions of interest, we do not find any significant clusters.

Alpha band
plotPermTestSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

For both regions of interest, we do not find any significant clusters.

Beta band
plotPermTestSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We only find a significant cluster for the lateral central ROI, during random rotation training. This occurs around 800 ms post-feedback, where beta power seems to be increased for large errors compared to small errors.

Time-Frequency Representations (Perturbation Type Comparisons)

Next, we subtract the small from the large error conditions, across the different perturbation types. Then, we compare each perturbation type with the other two. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves.

Medial frontal areas

Latercal central areas

Frequency bands comparing across perturbation types

Theta band
plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

We do not find any significant clusters.

Alpha band
plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

We do not find any significant clusters.

Beta band
plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We find significant clusters in the lateral central ROI, when comparing the fixed rotation and mirror with the random rotation perturbation.

Movement preparation

Next, we show TFR plots anad analyses time-locked to the go signal onset. We include time points from -1.5 seconds to zero, but focus our analyses on the second prior to the go signal. That is, once the target is cued until they are allowed to move towards the target.

Early vs. Late training

We split the data into the different conditions, in a similar manner as above.

Time-Frequency Representations

Medial frontal areas

Lateral central areas

Frequency bands compared to aligned baseline

For each ROI, we calculate the mean power (µV²) within each participant of the following frequency bands: theta (6-8 Hz), alpha (9-13 Hz), and beta (13-25 Hz). We then compare these mean frequencies between early and late training for the different perturbation types.

First, we compare each early or late condition to the aligned baseline condition. For statistical analyses, we implemented a cluster-based permutation t-test. Clusters of time points that exceed the t-value threshold (determined by a t-distribution, given a p-value of 0.05 and sample size of 32) will be shown in light orange or red colors, while clusters of time points that significantly differ from chance after 1000 permutations will be shown in dark orange or red colors.

Theta band
plotGoOnsetPermTestEarlyLateTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestEarlyLateTFRs(freqs = 'theta', roi = 'latcen')

Alpha band
plotGoOnsetPermTestEarlyLateTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestEarlyLateTFRs(freqs = 'alpha', roi = 'latcen')

Beta band
plotGoOnsetPermTestEarlyLateTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestEarlyLateTFRs(freqs = 'beta', roi = 'latcen')

Time-Frequency Representations (Early vs. Late Difference Waves)

Next, we subtract the aligned condition from each early and late condition, across the different perturbation types. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves

Medial frontal areas

Latercal central areas

Frequency bands comparing difference waves between early and late training

Theta band
plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

We do not find significant clusters.

Alpha band
plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

We find differences in both ROIs when comparing early and late random perturbation training. In both ROIs, alpha power is decreased in late random training compared to early.

Beta band
plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We find differences in both ROIs when comparing early and late random perturbation training. In both ROIs, beta power is decreased in late random training compared to early.

Time-Frequency Representations (Perturbation type comparisons)

Next, we subtract the early from the late condition, across the different perturbation types. Then, we compare each perturbation type with the other two. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves.

Medial frontal areas

Lateral central areas

Frequency bands comparing across perturbation types

Theta band
plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

We do not observe any significant clusters for both regions of interest.

Alpha band
plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

We do not observe any significant clusters for both regions of interest.

Beta band
plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestPTypeEarlyLateDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We do not observe any significant clusters for both regions of interest.

Small vs. Large errors

We then repeat the same analyses steps but now compare small and large error conditions.

Time-Frequency Representations

Medial frontal areas

Lateral central areas

Frequency bands compared to aligned baseline

Theta band
plotGoOnsetPermTestSmallLargeTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestSmallLargeTFRs(freqs = 'theta', roi = 'latcen')

Alpha band
plotGoOnsetPermTestSmallLargeTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestSmallLargeTFRs(freqs = 'alpha', roi = 'latcen')

Beta band
plotGoOnsetPermTestSmallLargeTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestSmallLargeTFRs(freqs = 'beta', roi = 'latcen')

Time-Frequency Representations (Small vs. Large Difference Waves)

Next, we subtract the aligned condition from each small and large condition, across the different perturbation types. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves.

Medial frontal areas

Latercal central areas

Frequency bands comparing difference waves between small and large errors

Theta band
plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

For both regions of interest, we do not find any significant clusters.

Alpha band
plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

We find a significant cluster for random condition in lateral central areas, where small errors are more negative than large errors.

Beta band
plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

We find differences in both ROIs for the rotation perturbation, where large errors show more negative power than small errors.

Time-Frequency Representations (Perturbation Type Comparisons)

Next, we subtract the small from the large error conditions, across the different perturbation types. Then, we compare each perturbation type with the other two. Statistical analyses will still be based from the cluster-based permutation tests conducted on these difference waves.

Medial frontal areas

Latercal central areas

Frequency bands comparing across perturbation types

Theta band
plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'medfro')

plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'theta', roi = 'latcen')

We do not find any significant clusters.

Alpha band
plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'medfro')

plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'alpha', roi = 'latcen')

For the lateral central area, we find a difference between fixed rotation and mirror perturbations, where rotation alpha power is decreased compared to mirror, just following the target onset.

Beta band
plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'medfro')

plotGoOnsetPermTestPTypeSmallLargeDiffWavesTFRs(freqs = 'beta', roi = 'latcen')

For the lateral central area, we find a significant cluster when comparing mirror and fixed rotation, occurring just after target onset. Beta power for the fixed rotation is lower compared to mirror. We also observe more negative power for rotation compared to mirror in medial frontal areas, but this occurs later and for a much shorter time.

Manuscript plots

Although we have all figures and statistical comparisons in this document, we summarize the main findings in the manuscript.

plotTFRThetaResults()

plotTFRAlphaResults()

plotTFRBetaResults()